////////////////////////////////////////////////////////////////////////////////
// Filename: Character.h
////////////////////////////////////////////////////////////////////////////////
#ifndef _CHARACTER_H_
#define _CHARACTER_H_

//////////////
// INCLUDES //
//////////////
#include "Entity.h"
#include <btBulletCollisionCommon.h>
#include <btBulletDynamicsCommon.h>
#include <BulletDynamics/Character/btKinematicCharacterController.h>
#include <windows.h>
#include <xnamath.h>

class Model3D;
class Game;

class Character : Entity
{
public:
	Character();
	Character(const Character&);
	~Character();
	Character operator=(Character const&);

	virtual bool Initialize(Model3D *pModel);
	virtual void InitializeByXml(TiXmlElement* entityElement);
	virtual void Uninit();

	virtual void Update(int pElapsedTime);
	virtual void PreRender();
	virtual void Render();

	XMFLOAT3 getPosition();
	XMFLOAT3 getHeadPosition();

	XMFLOAT4X4* GetHeadTransformation();

	float getBodyOrienation();
	float getHeadOrienation();
protected:
	Game* mGame;
	btScalar mWalkSpeed;

	float mBodyOrientation;
	float mHeadOrientation;

	//btPairCachingGhostObject * mGhostObject;
	//btKinematicCharacterController* mCharacterController;
	PhysicShape* mPhysicShape;
	btRigidBody* mRigidBody;

	XMFLOAT4X4 mHeadTransformation;
};
#endif